import os
import shutil

# 每个场景的图像帧的名称中的特征字符串
scenes = ['', 'frame_20190829091111_x_', 'frame_20190905091750_x_', 'frame_20190905103112_x_',
          'frame_20190905111947_x_', 'frame_20190905112522_x_', 'frame_20190905142119_x_',
          'frame_20190905143505_x_', 'frame_20190906150731_x_']
# 原始整个数据集的路径
all_images_path = "../datasets/AuAir/origin/all_images"
images_list = os.listdir(all_images_path)
for image in images_list:
    src = os.path.join(all_images_path, image)
    for i in range(1, len(scenes)):
        if scenes[i] in image:
            dst = "../datasets/AuAir/scene" + str(i) + "/images/" + image
            shutil.copy(src, dst)
            break

